#include "aboutwidget.h"
#include "ui_aboutwidget.h"

AboutWidget::AboutWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::AboutWidget)
{
    ui->setupUi(this);
}

AboutWidget::~AboutWidget()
{
    delete ui;
}

void AboutWidget::on_pushButton_clicked()
{
    QWidget* weiChat = new QWidget();
    weiChat->setAttribute(Qt::WA_QuitOnClose, false);
    weiChat->setWindowTitle("感谢打赏支持");
    QPixmap pixmap(":/img/money.jpg");
    double scaleFactor = 0.5;
    QSize newSize = pixmap.size() * scaleFactor;
    QLabel* ico = new QLabel(weiChat);
    //ico->setPixmap(pixmap);
    // 设置标签的图片，并缩放
    ico->setPixmap(pixmap.scaled(newSize, Qt::KeepAspectRatio, Qt::SmoothTransformation));
    ico->resize(pixmap.width()*0.5,pixmap.height()*0.5);
    weiChat->show();
}
